Commit c20996f567c52903a1f1622b8d9e6182322a734e
1 parent
17888141
Exists in
master
and in
1 other branch
Working on IPC module for windows.
Showing
3 changed files
with
5 additions
and
4 deletions
Show diff stats
src/service/service.c
| ... | ... | @@ -122,10 +122,12 @@ int main(int argc, char *argv[]) { |
| 122 | 122 | return -1; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | +#ifndef _WIN32 | |
| 125 | 126 | if(asDaemon && daemon(0,0)) { |
| 126 | 127 | fprintf(stderr,"%s\n",strerror(errno)); |
| 127 | 128 | return -1; |
| 128 | 129 | } |
| 130 | +#endif // _WIN32 | |
| 129 | 131 | |
| 130 | 132 | main_loop = g_main_loop_new(NULL, FALSE); |
| 131 | 133 | g_main_loop_run(main_loop); | ... | ... |
src/windows/gobject.c
| ... | ... | @@ -97,12 +97,11 @@ void ipc3270_set_session(GObject *object, H3270 *hSession, const char *name, GEr |
| 97 | 97 | |
| 98 | 98 | if(hPipe != INVALID_HANDLE_VALUE) { |
| 99 | 99 | |
| 100 | - ipc->source = (IPC3270_PIPE_SOURCE *) g_source_new(&pipe_source_funcs,sizeof(IPC3270_PIPE_SOURCE)); | |
| 100 | + ipc->source = (IPC3270_PIPE_SOURCE *) g_source_new(&ipc3270_source_funcs,sizeof(IPC3270_PIPE_SOURCE)); | |
| 101 | 101 | |
| 102 | 102 | lib3270_set_session_id(ipc->hSession, id); |
| 103 | 103 | |
| 104 | 104 | ipc->source->hPipe = hPipe; |
| 105 | - ipc->source->hSession = hSession; | |
| 106 | 105 | ipc->source->state = PIPE_STATE_WAITING; |
| 107 | 106 | ipc->source->overlap.hEvent = CreateEvent( NULL,TRUE,TRUE,NULL); |
| 108 | 107 | ... | ... |
src/windows/pipesource.c
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | void ipc3270_wait_for_client(IPC3270_PIPE_SOURCE *source) { |
| 33 | 33 | |
| 34 | 34 | if(ConnectNamedPipe(source->hPipe,&source->overlap)) { |
| 35 | - g_message("Error %u in ConnectNamedPipe",(unsigned int) getLastError()); | |
| 35 | + g_message("Error %u in ConnectNamedPipe",(unsigned int) GetLastError()); | |
| 36 | 36 | // popup_lasterror("%s",_( "Error in ConnectNamedPipe" )); |
| 37 | 37 | return; |
| 38 | 38 | } |
| ... | ... | @@ -48,7 +48,7 @@ void ipc3270_wait_for_client(IPC3270_PIPE_SOURCE *source) { |
| 48 | 48 | break; |
| 49 | 49 | |
| 50 | 50 | default: |
| 51 | - g_message("Error %u in ConnectNamedPipe",(unsigned int) getLastError()); | |
| 51 | + g_message("Error %u in ConnectNamedPipe",(unsigned int) GetLastError()); | |
| 52 | 52 | // popup_lasterror("%s", _( "ConnectNamedPipe failed" )); |
| 53 | 53 | } |
| 54 | 54 | ... | ... |