1 diff -crB ipupdate-1.1.1_orig/include/array.c ipupdate-1.1.1/include/array.c
2 *** ipupdate-1.1.1_orig/include/array.c 2011-03-20 21:58:51.470000007 +0000
3 --- ipupdate-1.1.1/include/array.c 2011-03-20 21:59:36.260000007 +0000
11 ** remove length elements from array starting at offset
12 ** All trailing elements will be left aligned
19 ** remove length elements from array starting at offset
20 ** All trailing elements will be left aligned
23 ** Returns the number of elements removed
26 ! int splice(void** array, int cnt, int offset, int length)
31 ** Returns the number of elements removed
34 ! int nsplice(void** array, int cnt, int offset, int length)
38 diff -crB ipupdate-1.1.1_orig/include/array.h ipupdate-1.1.1/include/array.h
39 *** ipupdate-1.1.1_orig/include/array.h 2011-03-20 21:58:51.466666674 +0000
40 --- ipupdate-1.1.1/include/array.h 2011-03-20 21:59:36.260000007 +0000
45 char** split(char*, const char*, int*);
46 ! int splice(void**, int, int, int);
50 char** split(char*, const char*, int*);
51 ! int nsplice(void**, int, int, int);
52 diff -crB ipupdate-1.1.1_orig/ipupdate.c ipupdate-1.1.1/ipupdate.c
53 *** ipupdate-1.1.1_orig/ipupdate.c 2011-03-20 21:58:51.470000007 +0000
54 --- ipupdate-1.1.1/ipupdate.c 2011-03-20 21:59:36.263333340 +0000
58 free(server->zones[j]);
60 ! server->zonec -= splice((void**)server->zones, server->zonec, j, 1);
66 free(server->zones[j]);
68 ! server->zonec -= nsplice((void**)server->zones, server->zonec, j, 1);
77 ! cfg.serverc -= splice((void**)cfg.servers, cfg.serverc, i, 1);
85 ! cfg.serverc -= nsplice((void**)cfg.servers, cfg.serverc, i, 1);
91 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
94 ! zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
99 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
102 ! zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1);
108 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
111 ! zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
114 //append the record to the packet
116 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
119 ! zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1);
122 //append the record to the packet
125 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
128 ! zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1);
133 asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
136 ! zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1);
142 asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
145 ! if (zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1))
147 *((unsigned short*)&pkt.data[8]) = htons(zone->hostc);
150 asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]);
153 ! if (zone->hostc -= nsplice((void**)zone->hosts, zone->hostc, i, 1))
155 *((unsigned short*)&pkt.data[8]) = htons(zone->hostc);
157 diff -crB ipupdate-1.1.1_orig/Makefile ipupdate-1.1.1/Makefile
158 *** ipupdate-1.1.1_orig/Makefile 2011-03-20 21:58:51.476666673 +0000
159 --- ipupdate-1.1.1/Makefile 2011-03-20 22:03:10.423333341 +0000
162 -rm ipupdate dollardns whatismyip ifip failover *.o
165 ! cp -f ipupdate /usr/sbin
166 ! mkdir -p /etc/ipupdate
167 ! cp -f dollardns whatismyip ifip failover /etc/ipupdate
168 ! @echo "installing man pages"
169 ! @-if [ -x /usr/share/man ]; then \
170 ! cp -f man/getip.7 /usr/share/man/man7/getip.7; \
171 ! cp -f man/ipupdate.8 /usr/share/man/man8/ipupdate.8; \
172 ! cp -f man/ipupdate.conf.5 /usr/share/man/man5/ipupdate.conf.5; \
173 ! elif [ -x /usr/local/man ]; then \
174 ! cp -f man/getip.7 /usr/local/man/man7/getip.7; \
175 ! cp -f man/ipupdate.8 /usr/local/man/man8/ipupdate.8; \
176 ! cp -f man/ipupdate.conf.5 /usr/local/man/man5/ipupdate.conf.5; \
178 ! cp -f man/getip.7 /usr/man/man7/getip.7; \
179 ! cp -f man/ipupdate.8 /usr/man/man8/ipupdate.8; \
180 ! cp -f man/ipupdate.conf.5 /usr/man/man5/ipupdate.conf.5; fi
181 ! cp -i ipupdate.conf /etc
182 ! chmod 640 /etc/ipupdate.conf
185 ! -rm /usr/sbin/ipupdate
186 ! -rm -r /etc/ipupdate
187 @echo "uninstalling man pages"
188 ! @-if [ -x /usr/share/man ]; then \
189 ! rm /usr/share/man/man7/getip.7; \
190 ! rm /usr/share/man/man8/ipupdate.8; \
191 ! rm /usr/share/man/man5/ipupdate.conf.5; \
192 ! elif [ -x /usr/local/man ]; then \
193 ! rm /usr/local/man/man7/getip.7 \
194 ! rm /usr/local/man/man8/ipupdate.8; \
195 ! rm /usr/local/man/man5/ipupdate.conf.5; \
197 ! rm /usr/man/man7/getip.7; \
198 ! rm /usr/man/man8/ipupdate.8; \
199 ! rm /usr/man/man5/ipupdate.conf.5; fi
200 ! rm -i /etc/ipupdate.conf
202 -rm ipupdate dollardns whatismyip ifip failover *.o
205 ! cp -f ipupdate $(DESTDIR)/usr/sbin
206 ! mkdir -p $(DESTDIR)/etc/ipupdate
207 ! cp -f dollardns whatismyip ifip failover $(DESTDIR)/etc/ipupdate
208 ! @echo "installing man pages" #archlinux man is in /usr/share/man
209 ! @-if [ -x $(DESTDIR)/usr/share/man ]; then \
210 ! cp -f man/getip.7 $(DESTDIR)/usr/share/man/man7/getip.7; \
211 ! cp -f man/ipupdate.8 $(DESTDIR)/usr/share/man/man8/ipupdate.8; \
212 ! cp -f man/ipupdate.conf.5 $(DESTDIR)/usr/share/man/man5/ipupdate.conf.5; \
213 ! elif [ -x $(DESTDIR)/usr/local/man ]; then \
214 ! cp -f man/getip.7 $(DESTDIR)/usr/local/man/man7/getip.7; \
215 ! cp -f man/ipupdate.8 $(DESTDIR)/usr/local/man/man8/ipupdate.8; \
216 ! cp -f man/ipupdate.conf.5 $(DESTDIR)/usr/local/man/man5/ipupdate.conf.5; \
218 ! cp -f man/getip.7 $(DESTDIR)/usr/man/man7/getip.7; \
219 ! cp -f man/ipupdate.8 $(DESTDIR)/usr/man/man8/ipupdate.8; \
220 ! cp -f man/ipupdate.conf.5 $(DESTDIR)/usr/man/man5/ipupdate.conf.5; fi
221 ! cp -i ipupdate.conf $(DESTDIR)/etc
222 ! chmod 640 $(DESTDIR)/etc/ipupdate.conf
225 ! -rm $(DESTDIR)/usr/sbin/ipupdate
226 ! -rm -r $(DESTDIR)/etc/ipupdate
227 @echo "uninstalling man pages"
228 ! @-if [ -x $(DESTDIR)/usr/share/man ]; then \
229 ! rm $(DESTDIR)/usr/share/man/man7/getip.7; \
230 ! rm $(DESTDIR)/usr/share/man/man8/ipupdate.8; \
231 ! rm $(DESTDIR)/usr/share/man/man5/ipupdate.conf.5; \
232 ! elif [ -x $(DESTDIR)/usr/local/man ]; then \
233 ! rm $(DESTDIR)/usr/local/man/man7/getip.7 \
234 ! rm $(DESTDIR)/usr/local/man/man8/ipupdate.8; \
235 ! rm $(DESTDIR)/usr/local/man/man5/ipupdate.conf.5; \
237 ! rm $(DESTDIR)/usr/man/man7/getip.7; \
238 ! rm $(DESTDIR)/usr/man/man8/ipupdate.8; \
239 ! rm $(DESTDIR)/usr/man/man5/ipupdate.conf.5; fi
240 ! rm -i $(DESTDIR)/etc/ipupdate.conf