]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 13 Dec 2005 20:08:05 +0000 (20:08 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 13 Dec 2005 20:08:05 +0000 (20:08 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@129 d0543943-73ff-0310-b7d9-9358b9ac24b2

modules.conf
src/mod/mod_portaudio/Makefile [new file with mode: 0644]
src/mod/mod_portaudio/mod_portaudio.c

index 1a10c37ecf7e57b3baf691370851d81f3dfd577e..e9b6e011e4ecaf3014075ee7a7dfb3cfd2c10b7b 100644 (file)
@@ -13,3 +13,4 @@ mod_iaxchan
 #mod_opalchan
 mod_codec_g729
 mod_event_test
+mod_portaudio
diff --git a/src/mod/mod_portaudio/Makefile b/src/mod/mod_portaudio/Makefile
new file mode 100644 (file)
index 0000000..6a9cbb2
--- /dev/null
@@ -0,0 +1,11 @@
+LDFLAGS += -lportaudio -L/usr/local/lib
+
+$(MOD).so: $(MOD).c
+       $(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o 
+       $(CC) -shared -Xlinker -x -o $(MOD).so  $(MOD).o $(LDFLAGS)
+
+all:   $(MOD).so
+
+clean:
+       rm -fr *.so *.o *~
+
index 9c8495ec8ddc10c0b11452849a27e82240dcd251..12248d6efe5f60c8590a41faa148113fb6709a1a 100644 (file)
@@ -40,7 +40,7 @@
 static const char modname[] = "mod_portaudio";
 
 static switch_memory_pool *module_pool;
-static int running = 1;
+//static int running = 1;
 
 #define SAMPLE_TYPE  paInt16
 typedef short SAMPLE;
@@ -112,8 +112,8 @@ static int get_dev_by_name(char *name, int in);
 static switch_status place_call(char *dest, char *out, size_t outlen);
 static switch_status hup_call(char *callid, char *out, size_t outlen);
 static switch_status call_info(char *callid, char *out, size_t outlen);
-static void send_dtmf(char *callid, char *out, size_t outlen);
-static void answer_call(char *callid, char *out, size_t outlen);
+static switch_status send_dtmf(char *callid, char *out, size_t outlen);
+static switch_status answer_call(char *callid, char *out, size_t outlen);
 
 /* 
    State methods they get called when the state changes to the specific state 
@@ -268,7 +268,6 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
                struct private_object *tech_pvt;
                switch_channel *channel, *orig_channel;
                switch_caller_profile *caller_profile, *originator_caller_profile = NULL;
-               unsigned int req = 0, cap = 0;
 
                if ((tech_pvt = (struct private_object *) switch_core_session_alloc(*new_session, sizeof(struct private_object)))) {
                        memset(tech_pvt, 0, sizeof(*tech_pvt));
@@ -808,13 +807,13 @@ static switch_status hup_call(char *callid, char *out, size_t outlen)
 }
 
 
-static void send_dtmf(char *callid, char *out, size_t outlen)
+static switch_status send_dtmf(char *callid, char *out, size_t outlen)
 {
        struct private_object *tech_pvt = NULL;
        switch_channel *channel = NULL;
        char *dtmf;
 
-       if (dtmf = strchr(callid, ' ')) {
+       if ((dtmf = strchr(callid, ' '))) {
                *dtmf++ = '\0';
        } else {
                dtmf = "";
@@ -828,9 +827,11 @@ static void send_dtmf(char *callid, char *out, size_t outlen)
        } else {
                strncpy(out, "NO SUCH CALL", outlen - 1);
        }
+
+       return SWITCH_STATUS_SUCCESS;
 }
 
-static void answer_call(char *callid, char *out, size_t outlen)
+static switch_status answer_call(char *callid, char *out, size_t outlen)
 {
        struct private_object *tech_pvt = NULL;
        switch_channel *channel = NULL;
@@ -843,6 +844,7 @@ static void answer_call(char *callid, char *out, size_t outlen)
        } else {
                strncpy(out, "NO SUCH CALL", outlen - 1);
        }
+       return SWITCH_STATUS_SUCCESS;
 }
 
 
@@ -879,4 +881,4 @@ static switch_status call_info(char *callid, char *out, size_t outlen)
        }
        
        return SWITCH_STATUS_SUCCESS;
-}
\ No newline at end of file
+}