Add other nettype support to lua_glue
This commit is contained in:
parent
18443d247e
commit
13dd935351
@ -407,7 +407,9 @@ int l_postMessage(lua_State *L) {
|
|||||||
const char *subject = lua_tostring(L, 5);
|
const char *subject = lua_tostring(L, 5);
|
||||||
const char *body = lua_tostring(L, 6);
|
const char *body = lua_tostring(L, 6);
|
||||||
int sem_fd;
|
int sem_fd;
|
||||||
|
uuid_t mnet_msgid;
|
||||||
|
uuid_t qwk_msgid;
|
||||||
|
char qwkuuid[38];
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
|
|
||||||
s_JamBase *jb;
|
s_JamBase *jb;
|
||||||
@ -464,6 +466,8 @@ int l_postMessage(lua_State *L) {
|
|||||||
jsf.Buffer = (char *)subject;
|
jsf.Buffer = (char *)subject;
|
||||||
JAM_PutSubfield(jsp, &jsf);
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
|
|
||||||
|
if (mc->networked) {
|
||||||
|
if (mc->nettype == NETWORK_FIDO) {
|
||||||
if (ma->type == TYPE_ECHOMAIL_AREA || ma->type == TYPE_NEWSGROUP_AREA) {
|
if (ma->type == TYPE_ECHOMAIL_AREA || ma->type == TYPE_NEWSGROUP_AREA) {
|
||||||
jmh.Attribute |= JAM_MSG_TYPEECHO;
|
jmh.Attribute |= JAM_MSG_TYPEECHO;
|
||||||
|
|
||||||
@ -504,7 +508,27 @@ int l_postMessage(lua_State *L) {
|
|||||||
free(jb);
|
free(jb);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
} else if (mc->nettype == NETWORK_MAGI) {
|
||||||
|
uuid_generate(mnet_msgid);
|
||||||
|
uuid_unparse_lower(mnet_msgid, buffer);
|
||||||
|
|
||||||
|
jsf.LoID = JAMSFLD_MSGID;
|
||||||
|
jsf.HiID = 0;
|
||||||
|
jsf.DatLen = strlen(buffer);
|
||||||
|
jsf.Buffer = (char *)buffer;
|
||||||
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
|
} else if (mc->nettype == NETWORK_QWK) {
|
||||||
|
uuid_generate(qwk_msgid);
|
||||||
|
uuid_unparse_lower(qwk_msgid, qwkuuid);
|
||||||
|
snprintf(buffer, sizeof buffer, "<%s@%s>", qwkuuid, conf.external_address);
|
||||||
|
|
||||||
|
jsf.LoID = JAMSFLD_MSGID;
|
||||||
|
jsf.HiID = 0;
|
||||||
|
jsf.DatLen = strlen(buffer);
|
||||||
|
jsf.Buffer = (char *)buffer;
|
||||||
|
JAM_PutSubfield(jsp, &jsf);
|
||||||
|
}
|
||||||
|
}
|
||||||
while (1) {
|
while (1) {
|
||||||
z = JAM_LockMB(jb, 100);
|
z = JAM_LockMB(jb, 100);
|
||||||
if (z == 0) {
|
if (z == 0) {
|
||||||
|
Reference in New Issue
Block a user