mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-17 09:34:08 +01:00
Merge remote-tracking branch 'origin/android_branch' into android_branch
This commit is contained in:
commit
cdd40b0782
4 changed files with 6 additions and 5 deletions
xwords4/relay
|
@ -65,7 +65,7 @@ def getPendingMsgs( con, typ ):
|
||||||
def unregister( gcmid ):
|
def unregister( gcmid ):
|
||||||
global g_con
|
global g_con
|
||||||
print "unregister(", gcmid, ")"
|
print "unregister(", gcmid, ")"
|
||||||
query = "UPDATE devices SET unreg=TRUE WHERE id = '%s'" % gcmid
|
query = "UPDATE devices SET unreg=TRUE WHERE devid = '%s'" % gcmid
|
||||||
g_con.cursor().execute( query )
|
g_con.cursor().execute( query )
|
||||||
|
|
||||||
def asGCMIds(con, devids, typ):
|
def asGCMIds(con, devids, typ):
|
||||||
|
|
|
@ -203,6 +203,7 @@ XWThreadPool::get_process_packet( SockType stype, const AddrInfo* addr )
|
||||||
short packetSize;
|
short packetSize;
|
||||||
assert( sizeof(packetSize) == 2 );
|
assert( sizeof(packetSize) == 2 );
|
||||||
|
|
||||||
|
// Fix this to return an allocated buffer
|
||||||
unsigned char buf[MAX_MSG_LEN+1];
|
unsigned char buf[MAX_MSG_LEN+1];
|
||||||
int nRead = read_packet( addr->socket(), buf, sizeof(buf) );
|
int nRead = read_packet( addr->socket(), buf, sizeof(buf) );
|
||||||
if ( nRead < 0 ) {
|
if ( nRead < 0 ) {
|
||||||
|
|
|
@ -1240,11 +1240,11 @@ main( int argc, char** argv )
|
||||||
if ( nWorkerThreads == 0 ) {
|
if ( nWorkerThreads == 0 ) {
|
||||||
(void)cfg->GetValueFor( "NTHREADS", &nWorkerThreads );
|
(void)cfg->GetValueFor( "NTHREADS", &nWorkerThreads );
|
||||||
}
|
}
|
||||||
if ( g_maxsocks == -1 ) {
|
|
||||||
(void)cfg->GetValueFor( "MAXSOCKS", &g_maxsocks );
|
if ( g_maxsocks == -1 && !cfg->GetValueFor( "MAXSOCKS", &g_maxsocks ) ) {
|
||||||
} else {
|
|
||||||
g_maxsocks = 100;
|
g_maxsocks = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
char serverNameBuf[128];
|
char serverNameBuf[128];
|
||||||
if ( serverName == NULL ) {
|
if ( serverName == NULL ) {
|
||||||
if ( cfg->GetValueFor( "SERVERNAME", serverNameBuf,
|
if ( cfg->GetValueFor( "SERVERNAME", serverNameBuf,
|
||||||
|
|
|
@ -122,7 +122,7 @@ typedef unsigned char XWRELAY_Cmd;
|
||||||
#define HOST_ID_SERVER 1
|
#define HOST_ID_SERVER 1
|
||||||
|
|
||||||
#define MAX_INVITE_LEN 31
|
#define MAX_INVITE_LEN 31
|
||||||
#define MAX_MSG_LEN 1024 /* Used for proxy too! */
|
#define MAX_MSG_LEN 2048 /* Used for proxy too! */
|
||||||
#define MAX_CONNNAME_LEN 48 /* host ID, boot time, and seeds as hex? */
|
#define MAX_CONNNAME_LEN 48 /* host ID, boot time, and seeds as hex? */
|
||||||
#define MAX_DEVID_LEN 8 /* 32-bit number as hex */
|
#define MAX_DEVID_LEN 8 /* 32-bit number as hex */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue