CID
This commit is contained in:
parent
94734280c6
commit
1e5a2e6cb7
@ -172,7 +172,9 @@ int close_modem(char* dev)
|
||||
lprintf(error, "dev %s must begin with /dev/\n", dev);
|
||||
return -5;
|
||||
}
|
||||
uu_unlock((dev+(sizeof("/dev/")-1)));
|
||||
if(uu_unlock((dev+(sizeof("/dev/")-1))) == -1) {
|
||||
lprintf(error, "uu_unlock: %s", strerror(errno));
|
||||
}
|
||||
fclose(modem);
|
||||
pthread_mutex_unlock(&modemmx);
|
||||
return 1;
|
||||
@ -209,13 +211,13 @@ int init_modem(char* dev)
|
||||
pthread_mutex_unlock(&modemmx);
|
||||
return -3;
|
||||
}
|
||||
pthread_mutex_unlock(&modemmx);
|
||||
mo = &rockwell;
|
||||
mo->init();
|
||||
voice_init();
|
||||
pthread_mutex_unlock(&modemmx);
|
||||
pthread_mutex_lock(&mpipemx);
|
||||
pipe(modempipes);
|
||||
pthread_mutex_unlock(&mpipemx);
|
||||
voice_init();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -27,14 +27,14 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $Amigan: phoned/phoned/modems/rockwell.c,v 1.6 2005/06/23 16:46:10 dcp1990 Exp $ */
|
||||
/* $Amigan: phoned/phoned/modems/rockwell.c,v 1.7 2005/06/26 03:27:35 dcp1990 Exp $ */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <pthread.h>
|
||||
#include <phoned.h>
|
||||
#define ROCKWELL_INITSTRING "ATZ\r\nAT E0 #CID=2 V0"
|
||||
#define ROCKWELL_INITSTRING "ATZ\r\nAT E0 #CID=2 V0\r\n"
|
||||
#define ROCKWELL_PICKUP "ATH1"
|
||||
#define ROCKWELL_HANGUP "ATH"
|
||||
#define ROCKWELL_RESET "ATZ"
|
||||
@ -47,6 +47,7 @@ short plug_init(void)
|
||||
int rw_init(void)
|
||||
{
|
||||
stmod(ROCKWELL_INITSTRING);
|
||||
stmod("AT#CID=2");
|
||||
return 1;
|
||||
}
|
||||
int rw_destroy(void)
|
||||
@ -134,6 +135,8 @@ void rw_sdev(d)
|
||||
/* voice */
|
||||
void rw_voice_init(void)
|
||||
{
|
||||
stmod("ATE0");
|
||||
stmod("ATV0");
|
||||
stmod("AT#VSP=55");
|
||||
stmod("AT#VSD=0");
|
||||
stmod("AT#VBS=4");
|
||||
@ -142,6 +145,7 @@ void rw_voice_init(void)
|
||||
stmod("ATS30=60");
|
||||
stmod("AT#CLS=8");
|
||||
rw_sdev(dialup);
|
||||
stmod("AT#CID=2");
|
||||
}
|
||||
void rw_set_rings(rings)
|
||||
int rings;
|
||||
|
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $Amigan: phoned/phoned/remote.c,v 1.14 2005/06/26 02:56:37 dcp1990 Exp $ */
|
||||
/* $Amigan: phoned/phoned/remote.c,v 1.15 2005/06/26 03:27:31 dcp1990 Exp $ */
|
||||
/* system includes */
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@ -255,7 +255,7 @@ int dialogue_cb(fd, sck)
|
||||
if(FD_ISSET(s, &fds) != 0) {
|
||||
rc = recv(s, buffer, 1, 0x0);
|
||||
if(rc == 0) {
|
||||
lprintf(debug, "Socket closed! Got zero!\n");
|
||||
lprintf(debug, "cb: Socket closed! Got zero!\n");
|
||||
return 0;
|
||||
} else if(rc == -1) {
|
||||
lprintf(debug, "recv(): %s", strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user