Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions modules/rest_client/rest_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,12 @@ size_t header_func(char *ptr, size_t size, size_t nmemb, void *userdata)
return len;
}

int timer_cb(CURLM *multi_handle, long timeout_ms, void *cbp)
{
LM_DBG("multi_handle timer called %ld\n", timeout_ms);
long *p = (long*) cbp;

*p = timeout_ms;

return 0;
}
3 changes: 3 additions & 0 deletions modules/rest_client/rest_cb.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#ifndef _REST_CB_H_
#define _REST_CB_H_

#include <curl/curl.h>

#include "rest_client.h"

#include "../../str.h"
Expand All @@ -41,6 +43,7 @@

size_t write_func(char *ptr, size_t size, size_t nmemb, void *userdata);
size_t header_func(char *ptr, size_t size, size_t nmemb, void *userdata);
int timer_cb(CURLM *multi_handle, long timeout_ms, void *cbp);

#endif /* _REST_CB_H_ */

Loading
Loading