[asterisk-addons-commits] trunk r243 - in /trunk/asterisk-ooh323c:
./ src/
asterisk-addons-commits at lists.digium.com
asterisk-addons-commits at lists.digium.com
Sat Jul 1 11:39:44 MST 2006
Author: russell
Date: Sat Jul 1 13:39:43 2006
New Revision: 243
URL: http://svn.digium.com/view/asterisk-addons?rev=243&view=rev
Log:
fix various issues to allow chan_ooh323 to compile and load properly
for the current trunk
Modified:
trunk/asterisk-ooh323c/config.h
trunk/asterisk-ooh323c/config.h.in
trunk/asterisk-ooh323c/src/chan_h323.c
trunk/asterisk-ooh323c/src/chan_h323.h
Modified: trunk/asterisk-ooh323c/config.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/config.h?rev=243&r1=242&r2=243&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/config.h (original)
+++ trunk/asterisk-ooh323c/config.h Sat Jul 1 13:39:43 2006
@@ -143,5 +143,5 @@
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
Modified: trunk/asterisk-ooh323c/config.h.in
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/config.h.in?rev=243&r1=242&r2=243&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/config.h.in (original)
+++ trunk/asterisk-ooh323c/config.h.in Sat Jul 1 13:39:43 2006
@@ -142,5 +142,5 @@
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
Modified: trunk/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/src/chan_h323.c?rev=243&r1=242&r2=243&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/src/chan_h323.c (original)
+++ trunk/asterisk-ooh323c/src/chan_h323.c Sat Jul 1 13:39:43 2006
@@ -50,7 +50,7 @@
static int ooh323_answer(struct ast_channel *ast);
static struct ast_frame *ooh323_read(struct ast_channel *ast);
static int ooh323_write(struct ast_channel *ast, struct ast_frame *f);
-static int ooh323_indicate(struct ast_channel *ast, int condition);
+static int ooh323_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen);
static int ooh323_fixup
(struct ast_channel *oldchan, struct ast_channel *newchan);
@@ -250,7 +250,7 @@
{
ast_mutex_lock(&ch->lock);
ch->tech = &ooh323_tech;
- snprintf(ch->name, sizeof(ch->name), "OOH323/%s-%04x",
+ ast_string_field_build(ch, name, "OOH323/%s-%04x",
host, rand() & 0xffff);
ch->nativeformats = i->capability;
@@ -258,7 +258,6 @@
fmt = ast_best_codec(ch->nativeformats);
- ch->type = type;
ch->fds[0] = ast_rtp_fd(i->rtp);
ch->fds[1] = ast_rtcp_fd(i->rtp);
@@ -321,10 +320,9 @@
}
}
- if (!ast_strlen_zero(i->accountcode)){
- strncpy(ch->accountcode, i->accountcode, sizeof(ch->accountcode)-1);
- ch->accountcode[sizeof(ch->accountcode)-1] = '\0';
- }
+ if (!ast_strlen_zero(i->accountcode))
+ ast_string_field_set(ch, accountcode, i->accountcode);
+
if (i->amaflags)
ch->amaflags = i->amaflags;
@@ -683,7 +681,7 @@
struct ooh323_pvt *p = ast->tech_pvt;
char destination[256];
int res=0;
- char *val=NULL;
+ const char *val=NULL;
ooCallOptions opts = {
.fastStart = TRUE,
.tunneling = TRUE,
@@ -906,7 +904,7 @@
return res;
}
-static int ooh323_indicate(struct ast_channel *ast, int condition)
+static int ooh323_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
{
struct ooh323_pvt *p = (struct ooh323_pvt *) ast->tech_pvt;
@@ -1732,7 +1730,7 @@
return 0;
}
-int reload(void)
+static int reload(void *mod)
{
return ooh323_reload(0, 0, NULL);
}
@@ -2300,7 +2298,7 @@
-int load_module(void)
+static int load_module(void *mod)
{
int res;
struct ooAliases * pNewAlias=NULL;
@@ -2668,7 +2666,7 @@
return 0;
}
-int unload_module()
+static int unload_module(void *mod)
{
struct ooh323_pvt *p;
struct ooAliases *cur=NULL, *prev=NULL;
@@ -3130,23 +3128,14 @@
return 0;
}
-int usecount()
-{
- int res;
- ast_mutex_lock(&usecnt_lock);
- res = usecnt;
- ast_mutex_unlock(&usecnt_lock);
- return res;
-}
-
-char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
-char *description()
+static const char *description(void)
{
return (char*)desc;
}
-
+STD_MOD(MOD_0, reload, NULL, NULL);
Modified: trunk/asterisk-ooh323c/src/chan_h323.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/src/chan_h323.h?rev=243&r1=242&r2=243&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/src/chan_h323.h (original)
+++ trunk/asterisk-ooh323c/src/chan_h323.h Sat Jul 1 13:39:43 2006
@@ -15,6 +15,13 @@
*****************************************************************************/
#ifndef _OO_CHAN_H323_H_
#define _OO_CHAN_H323_H_
+
+#include <asterisk.h>
+#undef PACKAGE_NAME
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_BUGREPORT
#include <stdlib.h>
#include <stdio.h>
@@ -52,6 +59,7 @@
#include <asterisk/musiconhold.h>
#include <asterisk/manager.h>
#include <asterisk/dsp.h>
+#include <asterisk/stringfields.h>
#include "ootypes.h"
#include "ooCapability.h"
@@ -79,7 +87,6 @@
int ooh323_destroy(struct ooh323_pvt *p);
int reload_config(void);
int restart_monitor(void);
-int unload_module(void);
int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
void setup_rtp_connection(ooCallData *call, const char *remoteIp,
More information about the asterisk-addons-commits
mailing list