The third parameter to ast_channel_tech.requester is const qualified,
authorJanis Ruksans <janis.ruksans@gmail.com>
Thu, 28 Jun 2012 06:02:55 +0000 (08:02 +0200)
committerAndreas Eversberg <jolly@eversberg.eu>
Thu, 28 Jun 2012 06:02:55 +0000 (08:02 +0200)
causing GCC to emit a warning about incompatible pointer types when
initializing lcr_tech. Fix this by adding necessary const's to lcr_request.

Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
chan_lcr.c

index a81e48d..4e93db1 100644 (file)
@@ -2088,7 +2088,7 @@ static
 #if ASTERISK_VERSION_NUM < 100000
 struct ast_channel *lcr_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
 #else
 #if ASTERISK_VERSION_NUM < 100000
 struct ast_channel *lcr_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
 #else
-struct ast_channel *lcr_request(const char *type, struct ast_format_cap *format, struct ast_channel *requestor, void *data, int *cause)
+struct ast_channel *lcr_request(const char *type, struct ast_format_cap *format, const struct ast_channel *requestor, void *data, int *cause)
 #endif
 #else
 struct ast_channel *lcr_request(const char *type, int format, void *data, int *cause)
 #endif
 #else
 struct ast_channel *lcr_request(const char *type, int format, void *data, int *cause)
@@ -2097,8 +2097,8 @@ struct ast_channel *lcr_request(const char *type, int format, void *data, int *c
        char exten[256], *dial, *interface, *opt;
        struct ast_channel *ast;
        struct chan_call *call;
        char exten[256], *dial, *interface, *opt;
        struct ast_channel *ast;
        struct chan_call *call;
-       struct ast_party_redirecting *req_redir;
-       struct ast_party_caller *req_caller;
+       const struct ast_party_redirecting *req_redir;
+       const struct ast_party_caller *req_caller;
 
        ast_mutex_lock(&chan_lock);
        CDEBUG(NULL, NULL, "Received request from Asterisk. (data=%s)\n", (char *)data);
 
        ast_mutex_lock(&chan_lock);
        CDEBUG(NULL, NULL, "Received request from Asterisk. (data=%s)\n", (char *)data);