diff -ruN ./win32/Makefile /usr/src/asterisk-1.0.9/win32/Makefile --- ./win32/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ /usr/src/asterisk-1.0.9/win32/Makefile 2005-04-18 21:48:24.000000000 +0200 @@ -0,0 +1,37 @@ +# +# Asterisk -- A telephony toolkit for Windows. +# +# Makefile for Win32 +# +# Copyright (C) 2002-04/2005 +# Patrick DERUEL +# +# +# This program is free software, distributed under the terms of +# the GNU General Public License +# + +WINDRES = windres.exe + +LIB_NAME = libwin32.a +OBJS=setpriority.o + +all: depend $(OBJS) $(LIB_NAME) + +$(LIB_NAME) : $(OBJS) + ar cr $(LIB_NAME) $(OBJS) + ranlib $(LIB_NAME) + +clean: + rm -f *.o *.res .depend + +ifneq ($(wildcard .depend),) +include .depend +endif + + + +depend: .depend + +.depend: + ../mkdep $(CFLAGS) `ls *.c` diff -ruN ./win32/resource.h /usr/src/asterisk-1.0.9/win32/resource.h --- ./win32/resource.h 1970-01-01 01:00:00.000000000 +0100 +++ /usr/src/asterisk-1.0.9/win32/resource.h 2005-04-18 16:53:02.000000000 +0200 @@ -0,0 +1,125 @@ +/* Weditres generated include file. Do NOT edit */ +#define DLG_0100 100 +#define _APS_NEXT_SYMED_VALUE 101 +#define IDR_MAINMENU 102 +#define IDD_ABOUT 103 +#define IDI_MYICON 104 +#define _APS_NEXT_RESOURCE_VALUE 105 +#define DLG_0200 200 +#define DLG_0300 300 +#define DLG_0400 400 +#define DLG_0500 500 +#define DLG_0600 600 +#define DLG_0700 700 +#define DLG_0800 800 +#define DLG_0900 900 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define ID_CLI_TEXT 1001 +#define ID_LOADEDMOD_LIST 1002 +#define ID_LOADEDMOD_LOADBTN 1003 +#define ID_MAINSET_VERBOSE 1004 +#define ID_MAINSET_DBGLEV 1005 +#define ID_MAINSET_CONSV 1006 +#define ID_MAINSET_CONSN 1007 +#define ID_MAINSET_CONSW 1008 +#define ID_MAINSET_CONSE 1009 +#define ID_MAINSET_CONSD 1010 +#define ID_MAINSET_LOGV 1011 +#define ID_MAINSET_LOGN 1012 +#define ID_MAINSET_LOGW 1013 +#define ID_MAINSET_LOGE 1014 +#define ID_MAINSET_LOGD 1015 +#define ID_MANAGSET_ENAB 1016 +#define ID_MANAGSET_PORT 1017 +#define ID_MANAGSET_USER 1018 +#define ID_MANAGSET_PWD 1019 +#define ID_MANAGSET_RLOG 1020 +#define ID_MANAGSET_RVERB 1021 +#define ID_MANAGSET_RSYS 1022 +#define ID_MANAGSET_RCALLS 1023 +#define ID_MANAGSET_RCMD 1024 +#define ID_MANAGSET_RAGENTS 1025 +#define ID_MANAGSET_RUSERS 1026 +#define ID_MANAGSET_WLOG 1027 +#define ID_MANAGSET_WVERB 1028 +#define ID_MANAGSET_WSYS 1029 +#define ID_MANAGSET_WCALLS 1030 +#define ID_MANAGSET_WCMD 1031 +#define ID_MANAGSET_WAGENTS 1032 +#define ID_MANAGSET_WUSERS 1033 +#define ID_MANAGSET_LIST 1034 +#define ID_MANAGSET_LADD 1035 +#define ID_MANAGSET_LDEL 1036 +#define ID_MANAGSET_LEDIT 1037 +#define ID_MANAGSET_LVALID 1038 +#define ID_MANAGSET_LCANCEL 1039 +#define ID_VOICEMAIL_SMTP 1040 +#define ID_VOICEMAIL_ATTACH 1041 +#define ID_VOICEMAIL_FORMAT 1042 +#define ID_VOICEMAIL_MAXL 1043 +#define ID_VOICEMAIL_MINL 1044 +#define ID_VOICEMAIL_LMAILBOX 1045 +#define ID_VOICEMAIL_LNAME 1046 +#define ID_VOICEMAIL_LPWD 1047 +#define ID_VOICEMAIL_LEMAIL 1048 +#define ID_VOICEMAIL_LPAGER 1049 +#define ID_VOICEMAIL_LOPTIONS 1050 +#define ID_VOICEMAIL_LIST 1051 +#define ID_VOICEMAIL_LADD 1052 +#define ID_VOICEMAIL_LDEL 1053 +#define ID_VOICEMAIL_LEDIT 1054 +#define ID_VOICEMAIL_LVALID 1055 +#define ID_VOICEMAIL_LCANCEL 1056 +#define ID_PARK_CONTEXT 1057 +#define ID_PARK_TIME 1058 +#define ID_PARK_EXTENSION 1059 +#define ID_PARK_MIN 1060 +#define ID_PARK_MAX 1061 +#define ID_MODULES_AUTO 1062 +#define ID_MODULES_LREMOVE 1063 +#define ID_MODULES_LLOAD 1064 +#define ID_MODULES_LREM_NOLOAD 1065 +#define ID_MODULES_LREM_REMOVE 1066 +#define ID_MODULES_LLOAD_LOAD 1067 +#define ID_MODULES_LLOAD_REMOVE 1068 +#define ID_FLASHOP_WEBHOST 1069 +#define ID_FLASHOP_SECCODE 1070 +#define ID_FLASHOP_REFRESH 1071 +#define ID_FLASHOP_DEBUG 1072 +#define ID_FLASHOP_MAN_NAME 1073 +#define ID_FLASHOP_MAN_PWD 1074 +#define ID_FLASHOP_MD5 1075 +#define ID_FLASHOP_CHECKVOICEMAIL 1076 +#define ID_FLASHOP_CONTEXT 1077 +#define ID_FLASHOP_CROOM_MIN 1078 +#define ID_FLASHOP_CROOM_MAX 1079 +#define ID_MODULES_MODS 1080 +#define ID_VOICEMAIL_MAILFROM 1081 +#define ID_MAINSET_HIGHPRI 1082 +#define ID_MAINSET_CONSEV 1083 +#define ID_MAINSET_LOGEV 1084 +#define ID_PARK_PICKUPEXT 1085 +#define ID_PARK_ADSIPARK 1086 +#define ID_PARK_TRANSFDIGIT 1087 +#define ID_PARK_COURTSYSTONE 1088 +#define ID_FLASHOP_PORT 1089 +#define ID_MANAGSET_BIND 1090 +#define ID_MANAGSET_PERMIT 1091 +#define ID_MANAGSET_DENY 1092 +#define ID_MODULE_LOAD 40001 +#define ID_AST_START 40002 +#define ID_AST_RELOAD 40003 +#define ID_AST_RESTART_NOW 40004 +#define ID_AST_STOP 40005 +#define ID_AST_ABOUT 40006 +#define ID_AST_EXIT 40007 +#define ID_AST_LOADED 40008 +#define ID_SET_MAIN 40009 +#define ID_SET_MODULES 40010 +#define ID_SET_MANAGERS 40011 +#define ID_SET_PARKS 40012 +#define ID_SET_VOICEMAIL 40013 +#define ID_SET_FLASHOP 40014 +#define ID_AST_CLI 40015 +#define ID_AST_RESTART_GRACEFULLY 40016 +#define _APS_NEXT_COMMAND_VALUE 40017 diff -ruN ./win32/setpriority.c /usr/src/asterisk-1.0.9/win32/setpriority.c --- ./win32/setpriority.c 1970-01-01 01:00:00.000000000 +0100 +++ /usr/src/asterisk-1.0.9/win32/setpriority.c 2005-04-18 22:24:28.000000000 +0200 @@ -0,0 +1,51 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * GUI & Console + * + * Copyright (C) 2002-03/2005, Patrick DERUEL + * + * Patrick DERUEL + * + * This program is free software, distributed under the terms of + * the GNU General Public License + */ + +#define _WIN32_WINNT 0x0500 +#include + +void AppendMessage(char *Str) {}; + +void setPriority(int priority) +{ + int dw_th= (int) (priority % 4); + int dw_ps= (int) (priority /4); + + HANDLE hProcess= GetCurrentProcess(); + + if ((dw_ps==1) && (SetPriorityClass(hProcess, ABOVE_NORMAL_PRIORITY_CLASS))) { + AppendMessage("Set PROCESS ABOVE_NORMAL_PRIORITY_CLASS\r\n"); + } + + if ((dw_ps>=2) && (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))) { + AppendMessage("Set PROCESS HIGH_PRIORITY_CLASS\r\n"); + } + +// if ((dw_ps>=3) && (SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS))) { +// AppendMessage("Set PROCESS REALTIME_PRIORITY_CLASS\r\n"); +// } + + HANDLE hThread= GetCurrentThread(); + if ((dw_th==1) && (SetThreadPriority(hThread, THREAD_PRIORITY_ABOVE_NORMAL))) { + AppendMessage("Set THREAD_PRIORITY_ABOVE_NORMAL\r\n"); + } + + if ((dw_th==2) && (SetThreadPriority(hThread, THREAD_PRIORITY_HIGHEST))) { + AppendMessage("Set THREAD_PRIORITY_HIGHEST\r\n"); + } + + if ((dw_th==3) && (SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL))) { + AppendMessage("Set THREAD_PRIORITY_TIME_CRITICAL\r\n"); + } +} + diff -ruN ./include/asterisk/win32.h /usr/src/asterisk-1.0.9/include/asterisk/win32.h --- ./include/asterisk/win32.h 1970-01-01 01:00:00.000000000 +0100 +++ /usr/src/asterisk-1.0.9/include/asterisk/win32.h 2005-04-18 21:22:32.000000000 +0200 @@ -0,0 +1,25 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * + * Copyright (C) 2002-03/2005, Patrick DERUEL + * + * Patrick DERUEL + * + * This program is free software, distributed under the terms of + * the GNU General Public License + */ + +#ifdef __CYGWIN__ +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN 46 +#endif +#endif +