[asterisk-commits] oej: branch oej/adsi-no-more r64681 - in /team/oej/adsi-no-more: apps/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 16 14:19:26 MST 2007


Author: oej
Date: Wed May 16 16:19:26 2007
New Revision: 64681

URL: http://svn.digium.com/view/asterisk?view=rev&rev=64681
Log:
Fixing bugs in the stub function. 
- Don't know what was wrong in the macro, but this version does work
- Made sure that all functions are named ast_ like in the include file. The stubs where not named correctly

This works - I can load app_voicemail and res_features without res_adsi loaded.
Can someone verify that ADSI works with res_adsi loaded? Thanks.

Modified:
    team/oej/adsi-no-more/apps/app_voicemail.c
    team/oej/adsi-no-more/main/adsistub.c

Modified: team/oej/adsi-no-more/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/adsi-no-more/apps/app_voicemail.c?view=diff&rev=64681&r1=64680&r2=64681
==============================================================================
--- team/oej/adsi-no-more/apps/app_voicemail.c (original)
+++ team/oej/adsi-no-more/apps/app_voicemail.c Wed May 16 16:19:26 2007
@@ -41,7 +41,6 @@
  */
 
 /*** MODULEINFO
-	<depend>res_adsi</depend>
  ***/
 
 /*** MAKEOPTS

Modified: team/oej/adsi-no-more/main/adsistub.c
URL: http://svn.digium.com/view/asterisk/team/oej/adsi-no-more/main/adsistub.c?view=diff&rev=64681&r1=64680&r2=64681
==============================================================================
--- team/oej/adsi-no-more/main/adsistub.c (original)
+++ team/oej/adsi-no-more/main/adsistub.c Wed May 16 16:19:26 2007
@@ -28,44 +28,56 @@
 #include "asterisk/adsi.h"
 #include "asterisk/logger.h"
 
+#ifdef SKREP
 #define build_stub(func_name,...) \
 static int stub_ ## func_name(__VA_ARGS__) \
 { \
-	if (option_debug > 5) \
+	if (option_debug > 4) \
 	        ast_log(LOG_NOTICE, "ADSI support not loaded!\n"); \
         return -1; \
 } \
 \
 int (*func_name)(__VA_ARGS__) = \
 	stub_ ## func_name;
+#endif
+#define build_stub(func_name,...) \
+static int stub_##func_name(__VA_ARGS__) \
+{ \
+	if (option_debug > 4) \
+	        ast_log(LOG_DEBUG, "ADSI support not loaded!\n"); \
+        return -1; \
+} \
+\
+int (*func_name)(__VA_ARGS__) = \
+	stub_##func_name;
 
-build_stub(adsi_channel_init,struct ast_channel *chan)
-build_stub(adsi_begin_download,struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
-build_stub(adsi_end_download,struct ast_channel *chan)
-build_stub(adsi_channel_restore,struct ast_channel *chan)
-build_stub(adsi_print,struct ast_channel *chan, char **lines, int *align, int voice)
-build_stub(adsi_load_session,struct ast_channel *chan, unsigned char *app, int ver, int data)
-build_stub(adsi_unload_session,struct ast_channel *chan)
-build_stub(adsi_transmit_messages,struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype)
-build_stub(adsi_transmit_message,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
-build_stub(adsi_transmit_message_full,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
-build_stub(adsi_read_encoded_dtmf,struct ast_channel *chan, unsigned char *buf, int maxlen)
-build_stub(adsi_connect_session,unsigned char *buf, unsigned char *fdn, int ver)
-build_stub(adsi_query_cpeid,unsigned char *buf)
-build_stub(adsi_query_cpeinfo,unsigned char *buf)
-build_stub(adsi_get_cpeid,struct ast_channel *chan, unsigned char *cpeid, int voice)
-build_stub(adsi_get_cpeinfo,struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
-build_stub(adsi_download_connect,unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
-build_stub(adsi_disconnect_session,unsigned char *buf)
-build_stub(adsi_download_disconnect,unsigned char *buf)
-build_stub(adsi_data_mode,unsigned char *buf)
-build_stub(adsi_clear_soft_keys,unsigned char *buf)
-build_stub(adsi_clear_screen,unsigned char *buf)
-build_stub(adsi_voice_mode,unsigned char *buf, int when)
-build_stub(adsi_available,struct ast_channel *chan)
-build_stub(adsi_display,unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
-build_stub(adsi_set_line,unsigned char *buf, int page, int line)
-build_stub(adsi_load_soft_key,unsigned char *buf, int key, char *llabel, char *slabel, char *ret, int data)
-build_stub(adsi_set_keys,unsigned char *buf, unsigned char *keys)
-build_stub(adsi_input_control,unsigned char *buf, int page, int line, int display, int format, int just)
-build_stub(adsi_input_format,unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
+build_stub(ast_adsi_channel_init,struct ast_channel *chan)
+build_stub(ast_adsi_begin_download,struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
+build_stub(ast_adsi_end_download,struct ast_channel *chan)
+build_stub(ast_adsi_channel_restore,struct ast_channel *chan)
+build_stub(ast_adsi_print,struct ast_channel *chan, char **lines, int *align, int voice)
+build_stub(ast_adsi_load_session,struct ast_channel *chan, unsigned char *app, int ver, int data)
+build_stub(ast_adsi_unload_session,struct ast_channel *chan)
+build_stub(ast_adsi_transmit_messages,struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype)
+build_stub(ast_adsi_transmit_message,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
+build_stub(ast_adsi_transmit_message_full,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
+build_stub(ast_adsi_read_encoded_dtmf,struct ast_channel *chan, unsigned char *buf, int maxlen)
+build_stub(ast_adsi_connect_session,unsigned char *buf, unsigned char *fdn, int ver)
+build_stub(ast_adsi_query_cpeid,unsigned char *buf)
+build_stub(ast_adsi_query_cpeinfo,unsigned char *buf)
+build_stub(ast_adsi_get_cpeid,struct ast_channel *chan, unsigned char *cpeid, int voice)
+build_stub(ast_adsi_get_cpeinfo,struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
+build_stub(ast_adsi_download_connect,unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
+build_stub(ast_adsi_disconnect_session,unsigned char *buf)
+build_stub(ast_adsi_download_disconnect,unsigned char *buf)
+build_stub(ast_adsi_data_mode,unsigned char *buf)
+build_stub(ast_adsi_clear_soft_keys,unsigned char *buf)
+build_stub(ast_adsi_clear_screen,unsigned char *buf)
+build_stub(ast_adsi_voice_mode,unsigned char *buf, int when)
+build_stub(ast_adsi_available,struct ast_channel *chan)
+build_stub(ast_adsi_display,unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
+build_stub(ast_adsi_set_line,unsigned char *buf, int page, int line)
+build_stub(ast_adsi_load_soft_key,unsigned char *buf, int key, char *llabel, char *slabel, char *ret, int data)
+build_stub(ast_adsi_set_keys,unsigned char *buf, unsigned char *keys)
+build_stub(ast_adsi_input_control,unsigned char *buf, int page, int line, int display, int format, int just)
+build_stub(ast_adsi_input_format,unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)



More information about the asterisk-commits mailing list