Update Sam.c

removed unused variable "domainname"